Skip to content

OpenAPI Test Generator - Full-stack Application#3

Open
charant30 wants to merge 1 commit intoautomationExamples:mainfrom
charant30:charan-openapi-test-generator
Open

OpenAPI Test Generator - Full-stack Application#3
charant30 wants to merge 1 commit intoautomationExamples:mainfrom
charant30:charan-openapi-test-generator

Conversation

@charant30
Copy link
Copy Markdown

Summary

Author: Charan

A complete full-stack application for generating and running API tests from OpenAPI specifications.

What This Does

  1. Upload an OpenAPI spec (YAML/JSON)
  2. Generate pytest test files automatically (Mock or Real LLM)
  3. Run tests against any API endpoint
  4. View detailed results with pass/fail, failures, and tracebacks

Tools Used

Tool Purpose
ChatGPT Initial planning and PRD (Product Requirements Document) creation
Claude Code Primary implementation - all code generation and development

Tech Stack

  • FastAPI - Backend REST API
  • Streamlit - Web UI
  • SQLite - Database for persistence
  • pytest - Test execution
  • httpx - HTTP client

Features

  • Web UI with 3 pages: Upload Spec → Generate Tests → Run Tests
  • Multiple LLM providers: Mock (deterministic), OpenAI, Anthropic
  • Cross-platform support (Windows, Mac, Linux)
  • 67 passing tests (unit, integration, e2e)
  • Docker support with docker-compose
  • CI/CD with GitHub Actions

How to Run

# Install dependencies
python run.py setup

# Start everything (API + UI + Example API)
python run.py all

# Open browser at http://localhost:8501

How to Run Tests

python run.py test
# All 67 tests should pass

Test Plan

  • Unit tests for OpenAPI parser, test generator, JUnit parser
  • Integration tests for API endpoints
  • E2E tests for full workflow
  • All 67 tests pass on Windows and Mac

Documentation


A complete solution for generating and running API tests from OpenAPI specifications.

Features:
- Upload OpenAPI specs (YAML/JSON) via Web UI or REST API
- Generate pytest tests using Mock LLM (deterministic) or Real LLM (OpenAI/Anthropic)
- Run tests against any API endpoint
- View detailed results with pass/fail, failures, and tracebacks
- Export JUnit XML for CI integration

Tech Stack:
- FastAPI backend with REST API
- Streamlit web interface
- SQLite database for persistence
- pytest for test execution
- httpx for HTTP client

Test Coverage:
- 67 tests (unit, integration, e2e)
- All tests pass on Windows and Mac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant